#include "widget.h"
#include "./ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::on_calendarWidget_selectionChanged()
{
    QDate selectedDate = ui->calendarWidget->selectedDate();
    qDebug() << "Selected date:" << selectedDate.toString("yyyy-MM-dd");
    ui->label->setText(selectedDate.toString("yyyy-MM-dd"));
}

